//
// Created by 谢哲 on 2021/5/13.
//

#include <iostream>
#include <vector>
using namespace std;

int main() {
    int n, p;
    cin >> n >> p;

    vector<double> adata, bdata;

    double total_sum = 0;
    for (int i=0; i<n; ++i) {
        double a, b;
        cin >> a >> b;
        adata.emplace_back(a);
        bdata.emplace_back(b);
        total_sum += a;
    }
    if (p >= total_sum) {
        cout << -1;
        return 0;
    }

    double l = 0.0, r = 1e10;
    while (r-l>=1e-5) {
        double mid = (l+r) / 2.0;
        double remain = mid * p;
        for (int i=0;i<n;++i){
            if (bdata[i]-adata[i]*mid>0.0) continue;
            remain -= adata[i]*mid - bdata[i];
        }
        if (remain < 0.0) {
            r = mid;
        }
        else {
            l = mid;
        }
    }

    cout << (l + r) / 2.0;

    return 0;
}